.class public Lcom/kwad/sdk/feed/a;
.super Lcom/kwad/sdk/api/core/AbstractKsFeedAd;


# instance fields
.field private a:Lcom/kwad/sdk/api/KsFeedAd$AdInteractionListener;

.field private b:Lcom/kwad/sdk/feed/widget/base/a;

.field private c:Lcom/kwad/sdk/core/response/model/AdTemplate;
    .annotation build Landroidx/annotation/NonNull;
    .end annotation
.end field

.field private d:Lcom/kwad/sdk/core/response/model/AdInfo;

.field private e:Lcom/kwad/sdk/feed/FeedType;

.field private f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;


# direct methods
.method public constructor <init>(Lcom/kwad/sdk/core/response/model/AdTemplate;)V
    .locals 2
    .param p1    # Lcom/kwad/sdk/core/response/model/AdTemplate;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    invoke-direct {p0}, Lcom/kwad/sdk/api/core/AbstractKsFeedAd;-><init>()V

    new-instance v0, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    invoke-direct {v0}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;-><init>()V

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->videoSoundEnable(Z)Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->dataFlowAutoStart(Z)Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->build()Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    move-result-object v0

    iput-object v0, p0, Lcom/kwad/sdk/feed/a;->f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->c:Lcom/kwad/sdk/core/response/model/AdTemplate;

    invoke-static {p1}, Lcom/kwad/sdk/core/response/b/c;->e(Lcom/kwad/sdk/core/response/model/AdTemplate;)Lcom/kwad/sdk/core/response/model/AdInfo;

    move-result-object p1

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->d:Lcom/kwad/sdk/core/response/model/AdInfo;

    iget-object p1, p0, Lcom/kwad/sdk/feed/a;->c:Lcom/kwad/sdk/core/response/model/AdTemplate;

    iget p1, p1, Lcom/kwad/sdk/core/response/model/AdTemplate;->type:I

    invoke-static {p1}, Lcom/kwad/sdk/feed/FeedType;->fromInt(I)Lcom/kwad/sdk/feed/FeedType;

    move-result-object p1

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    return-void
.end method

.method static synthetic a(Lcom/kwad/sdk/feed/a;)Lcom/kwad/sdk/api/KsFeedAd$AdInteractionListener;
    .locals 0

    iget-object p0, p0, Lcom/kwad/sdk/feed/a;->a:Lcom/kwad/sdk/api/KsFeedAd$AdInteractionListener;

    return-object p0
.end method

.method private a(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;
    .locals 2

    sget-object v0, Lcom/kwad/sdk/feed/a$2;->a:[I

    iget-object v1, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    aget v0, v0, v1

    const/4 v1, 0x1

    if-eq v0, v1, :cond_4

    const/4 v1, 0x2

    if-eq v0, v1, :cond_3

    const/4 v1, 0x3

    if-eq v0, v1, :cond_2

    const/4 v1, 0x4

    if-eq v0, v1, :cond_1

    const/4 v1, 0x5

    if-eq v0, v1, :cond_0

    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "getSingleImageView type is unknown:"

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, "KSFeedAdControl"

    invoke-static {v0, p1}, Lcom/kwad/sdk/core/d/b;->d(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p1, 0x0

    return-object p1

    :cond_0
    new-instance v0, Lcom/kwad/sdk/feed/widget/h;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/h;-><init>(Landroid/content/Context;)V

    return-object v0

    :cond_1
    new-instance v0, Lcom/kwad/sdk/feed/widget/g;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/g;-><init>(Landroid/content/Context;)V

    return-object v0

    :cond_2
    new-instance v0, Lcom/kwad/sdk/feed/widget/d;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/d;-><init>(Landroid/content/Context;)V

    return-object v0

    :cond_3
    new-instance v0, Lcom/kwad/sdk/feed/widget/b;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/b;-><init>(Landroid/content/Context;)V

    return-object v0

    :cond_4
    new-instance v0, Lcom/kwad/sdk/feed/widget/f;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/f;-><init>(Landroid/content/Context;)V

    return-object v0
.end method

.method private a()V
    .locals 2

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    if-nez v0, :cond_0

    return-void

    :cond_0
    new-instance v1, Lcom/kwad/sdk/feed/a$1;

    invoke-direct {v1, p0}, Lcom/kwad/sdk/feed/a$1;-><init>(Lcom/kwad/sdk/feed/a;)V

    invoke-virtual {v0, v1}, Lcom/kwad/sdk/feed/widget/base/a;->setAdClickListener(Lcom/kwad/sdk/feed/widget/base/a$a;)V

    return-void
.end method

.method private b(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;
    .locals 2

    sget-object v0, Lcom/kwad/sdk/feed/a$2;->a:[I

    iget-object v1, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "getVideoView type is unknown"

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, "KSFeedAdControl"

    invoke-static {v0, p1}, Lcom/kwad/sdk/core/d/b;->d(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p1, 0x0

    return-object p1

    :pswitch_0
    new-instance v0, Lcom/kwad/sdk/feed/widget/a;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/a;-><init>(Landroid/content/Context;)V

    return-object v0

    :pswitch_1
    new-instance v0, Lcom/kwad/sdk/feed/widget/h;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/h;-><init>(Landroid/content/Context;)V

    return-object v0

    :pswitch_2
    new-instance v0, Lcom/kwad/sdk/feed/widget/g;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/g;-><init>(Landroid/content/Context;)V

    return-object v0

    :pswitch_3
    new-instance v0, Lcom/kwad/sdk/feed/widget/d;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/d;-><init>(Landroid/content/Context;)V

    return-object v0

    :pswitch_4
    new-instance v0, Lcom/kwad/sdk/feed/widget/b;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/b;-><init>(Landroid/content/Context;)V

    return-object v0

    :pswitch_5
    new-instance v0, Lcom/kwad/sdk/feed/widget/f;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/f;-><init>(Landroid/content/Context;)V

    return-object v0

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_5
        :pswitch_4
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method static synthetic b(Lcom/kwad/sdk/feed/a;)Lcom/kwad/sdk/feed/widget/base/a;
    .locals 0

    iget-object p0, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    return-object p0
.end method

.method private c(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;
    .locals 2

    sget-object v0, Lcom/kwad/sdk/feed/a$2;->a:[I

    iget-object v1, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    aget v0, v0, v1

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1

    const/4 v1, 0x3

    if-eq v0, v1, :cond_0

    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "getVideoView type is unknown:"

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->e:Lcom/kwad/sdk/feed/FeedType;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, "KSFeedAdControl"

    invoke-static {v0, p1}, Lcom/kwad/sdk/core/d/b;->d(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p1, 0x0

    return-object p1

    :cond_0
    new-instance v0, Lcom/kwad/sdk/feed/widget/e;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/e;-><init>(Landroid/content/Context;)V

    return-object v0

    :cond_1
    new-instance v0, Lcom/kwad/sdk/feed/widget/c;

    invoke-direct {v0, p1}, Lcom/kwad/sdk/feed/widget/c;-><init>(Landroid/content/Context;)V

    return-object v0
.end method

.method private d(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;
    .locals 2
    .annotation build Landroidx/annotation/Nullable;
    .end annotation

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->d:Lcom/kwad/sdk/core/response/model/AdInfo;

    invoke-static {v0}, Lcom/kwad/sdk/core/response/b/a;->A(Lcom/kwad/sdk/core/response/model/AdInfo;)I

    move-result v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_2

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1

    const/4 v1, 0x3

    if-eq v0, v1, :cond_0

    const-string p1, "KSFeedAdControl"

    const-string v0, "getNewFeedView materialType is unknown"

    invoke-static {p1, v0}, Lcom/kwad/sdk/core/d/b;->d(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p1, 0x0

    return-object p1

    :cond_0
    invoke-direct {p0, p1}, Lcom/kwad/sdk/feed/a;->b(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;

    move-result-object p1

    return-object p1

    :cond_1
    invoke-direct {p0, p1}, Lcom/kwad/sdk/feed/a;->a(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;

    move-result-object p1

    return-object p1

    :cond_2
    invoke-direct {p0, p1}, Lcom/kwad/sdk/feed/a;->c(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;

    move-result-object p1

    return-object p1
.end method


# virtual methods
.method public getECPM()I
    .locals 1

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->d:Lcom/kwad/sdk/core/response/model/AdInfo;

    invoke-static {v0}, Lcom/kwad/sdk/core/response/b/a;->u(Lcom/kwad/sdk/core/response/model/AdInfo;)I

    move-result v0

    return v0
.end method

.method public getFeedView2(Landroid/content/Context;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    if-nez v0, :cond_0

    invoke-direct {p0, p1}, Lcom/kwad/sdk/feed/a;->d(Landroid/content/Context;)Lcom/kwad/sdk/feed/widget/base/a;

    move-result-object p1

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    goto :goto_0

    :cond_0
    invoke-virtual {v0}, Landroid/widget/FrameLayout;->getParent()Landroid/view/ViewParent;

    move-result-object p1

    instance-of p1, p1, Landroid/view/ViewGroup;

    if-eqz p1, :cond_1

    iget-object p1, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    invoke-virtual {p1}, Landroid/widget/FrameLayout;->getParent()Landroid/view/ViewParent;

    move-result-object p1

    check-cast p1, Landroid/view/ViewGroup;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_1
    :goto_0
    iget-object p1, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    if-eqz p1, :cond_4

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->c:Lcom/kwad/sdk/core/response/model/AdTemplate;

    invoke-virtual {p1, v0}, Lcom/kwad/sdk/feed/widget/base/a;->a(Lcom/kwad/sdk/core/response/model/AdTemplate;)V

    iget-object p1, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    instance-of v0, p1, Lcom/kwad/sdk/feed/widget/c;

    if-eqz v0, :cond_2

    check-cast p1, Lcom/kwad/sdk/feed/widget/c;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    invoke-virtual {p1, v0}, Lcom/kwad/sdk/feed/widget/c;->a(Lcom/kwad/sdk/api/KsAdVideoPlayConfig;)V

    goto :goto_1

    :cond_2
    instance-of v0, p1, Lcom/kwad/sdk/feed/widget/e;

    if-eqz v0, :cond_3

    check-cast p1, Lcom/kwad/sdk/feed/widget/e;

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    invoke-virtual {p1, v0}, Lcom/kwad/sdk/feed/widget/e;->a(Lcom/kwad/sdk/api/KsAdVideoPlayConfig;)V

    :cond_3
    :goto_1
    invoke-direct {p0}, Lcom/kwad/sdk/feed/a;->a()V

    :cond_4
    iget-object p1, p0, Lcom/kwad/sdk/feed/a;->b:Lcom/kwad/sdk/feed/widget/base/a;

    return-object p1
.end method

.method public setAdInteractionListener(Lcom/kwad/sdk/api/KsFeedAd$AdInteractionListener;)V
    .locals 0

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->a:Lcom/kwad/sdk/api/KsFeedAd$AdInteractionListener;

    return-void
.end method

.method public setBidEcpm(I)V
    .locals 1

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->c:Lcom/kwad/sdk/core/response/model/AdTemplate;

    iput p1, v0, Lcom/kwad/sdk/core/response/model/AdTemplate;->mBidEcpm:I

    invoke-static {v0}, Lcom/kwad/sdk/core/g/b;->o(Lcom/kwad/sdk/core/response/model/AdTemplate;)V

    return-void
.end method

.method public setVideoPlayConfig(Lcom/kwad/sdk/api/KsAdVideoPlayConfig;)V
    .locals 0
    .param p1    # Lcom/kwad/sdk/api/KsAdVideoPlayConfig;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    if-eqz p1, :cond_0

    iput-object p1, p0, Lcom/kwad/sdk/feed/a;->f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    :cond_0
    return-void
.end method

.method public setVideoSoundEnable(Z)V
    .locals 1

    iget-object v0, p0, Lcom/kwad/sdk/feed/a;->f:Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    invoke-interface {v0, p1}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig;->setVideoSoundEnable(Z)V

    return-void
.end method
